<template>
  <div class="public-title">
    <van-icon v-if="icon" :name="icon" />
    <span>{{ title }}</span>
  </div>
</template>

<script setup>
defineProps({
  title: {
    type: String,
    default: '',
  },
  icon: {
    type: String,
    default: '',
  },
})
</script>

<style lang="less" scoped>
.public-title {
  padding: 30px 24px 20px;
  font-weight: bold;
  position: relative;
  i {
    margin-right: 8px;
  }
  &::after {
    position: absolute;
    content: '';
    left: 12px;
    top: 50%;
    width: 3px;
    height: 18px;
    transform: translateY(-20%);
    background-color: #1989fa;
  }
}
</style>
